package cn.lang.auth.common.manager;

import cn.hutool.cache.Cache;
import cn.hutool.cache.CacheUtil;
import cn.lang.auth.pojo.dto.SysUserDto;

/**
 * @author Lang 1102076808@qq.com
 * @description 缓存
 * @date 2020-06-21 12:11
 */
public class CacheManager {

	private static Cache<Long, SysUserDto> lruCache = CacheUtil.newLRUCache(100);

	public static void putUser(Long key, SysUserDto value) {
		lruCache.put(key, value);
	}

	public static SysUserDto getUser(Long key) {
		return lruCache.get(key);
	}
}
